<%@ page language="java" import="java.util.*,cn.sypt.yuhao.domain.*,cn.sypt.yuhao.dao.*,cn.sypt.yuhao.model.*" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/admin/";
			
			String spid=request.getParameter("spid");	
			String tid=(String)request.getParameter("tid");
			//String str=new String(spname.getBytes("iso-8859-1"),"utf-8");
			ManagerBO mb=new ManagerBO();
			Exam exam=mb.getExam(tid);
			 Video video=mb.getVideo(spid);
			
%>

<!DOCTYPE HTML PUBLIC>
<html>
<head>
<base href="<%=basePath%>">
<title>后台管理系统</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!--[if lt IE 9]>
		<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<script src="Javascript/Flot/excanvas.js"></script>
	<![endif]-->
	<!-- The Fonts -->
	<link href="http://fonts.useso.com/css?family=Oswald|Droid+Sans:400,700" rel="stylesheet">
	<!-- The Main CSS File -->
	<link rel="stylesheet" href="CSS/style.css">
	<!-- jQuery -->
	<script src="Javascript/jQuery/jquery-1.7.2.min.js"></script>
	<!-- Flot -->
	<script src="Javascript/Flot/jquery.flot.js"></script>
	<script src="Javascript/Flot/jquery.flot.resize.js"></script>
	<script src="Javascript/Flot/jquery.flot.pie.js"></script>
	<!-- DataTables -->
	<script src="Javascript/DataTables/jquery.dataTables.min.js"></script>
	<!-- ColResizable -->
	<script src="Javascript/ColResizable/colResizable-1.3.js"></script>
	<!-- jQuryUI -->
	<script src="Javascript/jQueryUI/jquery-ui-1.8.21.min.js"></script>
	<!-- Uniform -->
	<script src="Javascript/Uniform/jquery.uniform.js"></script>
	<!-- Tipsy -->
	<script src="Javascript/Tipsy/jquery.tipsy.js"></script>
	<!-- Elastic -->
	<script src="Javascript/Elastic/jquery.elastic.js"></script>
	<!-- ColorPicker -->
	<script src="Javascript/ColorPicker/colorpicker.js"></script>
	<!-- SuperTextarea -->
	<script src="Javascript/SuperTextarea/jquery.supertextarea.min.js"></script>
	<!-- UISpinner -->
	<script src="Javascript/UISpinner/ui.spinner.js"></script>
	<!-- MaskedInput -->
	<script src="Javascript/MaskedInput/jquery.maskedinput-1.3.js"></script>
	<!-- ClEditor -->
	<script src="Javascript/ClEditor/jquery.cleditor.js"></script>
	<!-- Full Calendar -->
	<script src="Javascript/FullCalendar/fullcalendar.js"></script>
	<!-- Color Box -->
	<script src="Javascript/ColorBox/jquery.colorbox.js"></script>
	<!-- Kanrisha Script -->
	<script src="Javascript/kanrisha.js"></script>
	<script language="javascript">
function checkSub()
{
var flag=false;
var ttm=eform.ttm.value;
var ta=eform.ta.value;
var tb=eform.tb.value;
var tc=eform.tc.value;
var td=eform.td.value;
var tda=eform.tda.value;
var note=eform.note.value;

if(ttm.trim()=="")
{
window.alert("题目不能为空");
}
else if(ta.trim()=="")
{
window.alert("A选项不能为空");
}
else if(tb.trim()=="")
{
window.alert("B选项不能为空");
}
else if(tc.trim()=="")
{
window.alert("C选项不能为空");
}
else if(td.trim()=="")
{
window.alert("D选项不能为空");
}
else if(tda.trim()=="")
{
window.alert("答案不能为空");
}
else if(note.trim()=="")
{
window.alert("解析不能为空");
}
else
{
flag=true;
}

return flag;
}
</script>
</head>
<body>
	
<%@include file="/admin/head.jsp" %>
	<div class="wrapper contents_wrapper">
		<%@include file="/admin/left.jsp" %>
		
		<div class="contents">
			<div class="grid_wrapper">

				<div class="g_6 contents_header">
					<h3><%=video.getSpname() %>实验习题修改页面</h3>
				</div>
				
                
				<!-- Chats -->
				<div class="g_12 separator"><span></span></div>
				
		<form action="/sypt/ManagerServlet?flag=examgl2&flag1=xg&tid=<%=tid %>" name="eform" method="post">
						<div class="line_grid">
						<span class="label"></span>
							<div class="g_3"><span class="label">题目</span></div>							
								<input class="simple_field" type="text" name="ttm" value="<%=exam.getTtm() %>"/>
								<div class="g_3"><span class="label">A选项</span></div>
								<input class="simple_field" type="text" name="ta" value="<%=exam.getTa()%>"/>
								<div class="g_3"><span class="label">B选项</span></div>
								<input class="simple_field" type="text" name="tb" value="<%=exam.getTb()%>"/>
								<div class="g_3"><span class="label">C选项</span></div>
								<input class="simple_field" type="text" name="tc" value="<%=exam.getTc()%>"/>
								<div class="g_3"><span class="label">D选项</span></div>
								<input class="simple_field" type="text" name="td" value="<%=exam.getTd()%>"/>
								<div class="g_3"><span class="label">答案</span></div>
								<input class="simple_field" type="text" name="tda" value="<%=exam.getTda()%>"/>
								<div class="g_3"><span class="label">解析</span></div>
								<input class="simple_field" type="text" name="note" value="<%=exam.getNote()%>"/>
							<input type="submit" value="提交" onclick="return checkSub();">
							
						</div>
						</form>
			</div>	
		</div>
	</div>
	<jsp:include flush="true" page="foot.jsp"></jsp:include>
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>